<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>(core-lib)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">(core-lib)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group__utils.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle"><div class="title">Utilities</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p >Basic utility types, macros and functions. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga0a73602e14d41b2d525a1185597c8445"><td class="memItemLeft" align="right" valign="top"><a id="ga0a73602e14d41b2d525a1185597c8445" name="ga0a73602e14d41b2d525a1185597c8445"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_UNUSED_PARAMETER</b>(x)&#160;&#160;&#160;( (void)(x) )</td></tr>
<tr class="memdesc:ga0a73602e14d41b2d525a1185597c8445"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple macro to suppress the unused parameter warning by casting to void. <br /></td></tr>
<tr class="separator:ga0a73602e14d41b2d525a1185597c8445"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5bcf1928374c0433e7792c173bf7fd2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gad5bcf1928374c0433e7792c173bf7fd2">CY_HALT</a>()</td></tr>
<tr class="memdesc:gad5bcf1928374c0433e7792c173bf7fd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Halt the processor in the debug state.  <a href="group__group__utils.html#gad5bcf1928374c0433e7792c173bf7fd2">More...</a><br /></td></tr>
<tr class="separator:gad5bcf1928374c0433e7792c173bf7fd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8a1e3e0e2424cff7ad6ab53f6a183f5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gab8a1e3e0e2424cff7ad6ab53f6a183f5">CY_ASSERT_HANDLER</a>()&#160;&#160;&#160;<a class="el" href="group__group__utils.html#gad5bcf1928374c0433e7792c173bf7fd2">CY_HALT</a>()</td></tr>
<tr class="memdesc:gab8a1e3e0e2424cff7ad6ab53f6a183f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default assert handler.  <a href="group__group__utils.html#gab8a1e3e0e2424cff7ad6ab53f6a183f5">More...</a><br /></td></tr>
<tr class="separator:gab8a1e3e0e2424cff7ad6ab53f6a183f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab333fce69ffe5eef183d190d37cc04db"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gab333fce69ffe5eef183d190d37cc04db">CY_ASSERT</a>(x)</td></tr>
<tr class="memdesc:gab333fce69ffe5eef183d190d37cc04db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility macro when neither NDEBUG or CY_NO_ASSERT is not declared to check a condition and, if false, trigger a breakpoint.  <a href="group__group__utils.html#gab333fce69ffe5eef183d190d37cc04db">More...</a><br /></td></tr>
<tr class="separator:gab333fce69ffe5eef183d190d37cc04db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa818442482e1820a57c6999be7d123a7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gaa818442482e1820a57c6999be7d123a7">CY_ASSERT_AND_RETURN</a>(condition,  value)</td></tr>
<tr class="memdesc:gaa818442482e1820a57c6999be7d123a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assert an argument is true, else call assert handler and return a value.  <a href="group__group__utils.html#gaa818442482e1820a57c6999be7d123a7">More...</a><br /></td></tr>
<tr class="separator:gaa818442482e1820a57c6999be7d123a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga684f094e4e6c95a4bf84c9fb2bf4decd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga684f094e4e6c95a4bf84c9fb2bf4decd">CY_ASSERT_AND_RETURN_VOID</a>(condition)</td></tr>
<tr class="memdesc:ga684f094e4e6c95a4bf84c9fb2bf4decd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assert an argument is true, else call assert handler and return.  <a href="group__group__utils.html#ga684f094e4e6c95a4bf84c9fb2bf4decd">More...</a><br /></td></tr>
<tr class="separator:ga684f094e4e6c95a4bf84c9fb2bf4decd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7531a66d82ec4ab6c36a26579fedd3f"><td class="memItemLeft" align="right" valign="top"><a id="gaa7531a66d82ec4ab6c36a26579fedd3f" name="gaa7531a66d82ec4ab6c36a26579fedd3f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_LO8</b>(x)&#160;&#160;&#160;((uint8_t) ((x) &amp; 0xFFU))</td></tr>
<tr class="memdesc:gaa7531a66d82ec4ab6c36a26579fedd3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the lower 8 bits of a 16-bit value. <br /></td></tr>
<tr class="separator:gaa7531a66d82ec4ab6c36a26579fedd3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa57842ae9ca46f0e4b6f280e8f4eaa6c"><td class="memItemLeft" align="right" valign="top"><a id="gaa57842ae9ca46f0e4b6f280e8f4eaa6c" name="gaa57842ae9ca46f0e4b6f280e8f4eaa6c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_HI8</b>(x)&#160;&#160;&#160;((uint8_t) ((uint16_t)(x) &gt;&gt; 8U))</td></tr>
<tr class="memdesc:gaa57842ae9ca46f0e4b6f280e8f4eaa6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the upper 8 bits of a 16-bit value. <br /></td></tr>
<tr class="separator:gaa57842ae9ca46f0e4b6f280e8f4eaa6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga58340d6e97870eff30ea323d7c529d3b"><td class="memItemLeft" align="right" valign="top"><a id="ga58340d6e97870eff30ea323d7c529d3b" name="ga58340d6e97870eff30ea323d7c529d3b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_LO16</b>(x)&#160;&#160;&#160;((uint16_t) ((x) &amp; 0xFFFFU))</td></tr>
<tr class="memdesc:ga58340d6e97870eff30ea323d7c529d3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the lower 16 bits of a 32-bit value. <br /></td></tr>
<tr class="separator:ga58340d6e97870eff30ea323d7c529d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ecbc90074294a4427c78b3385281c80"><td class="memItemLeft" align="right" valign="top"><a id="ga4ecbc90074294a4427c78b3385281c80" name="ga4ecbc90074294a4427c78b3385281c80"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_HI16</b>(x)&#160;&#160;&#160;((uint16_t) ((uint32_t)(x) &gt;&gt; 16U))</td></tr>
<tr class="memdesc:ga4ecbc90074294a4427c78b3385281c80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the upper 16 bits of a 32-bit value. <br /></td></tr>
<tr class="separator:ga4ecbc90074294a4427c78b3385281c80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaeb74e76832ed842048d448d556f26bb"><td class="memItemLeft" align="right" valign="top"><a id="gaaeb74e76832ed842048d448d556f26bb" name="gaaeb74e76832ed842048d448d556f26bb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_SWAP_ENDIAN16</b>(x)&#160;&#160;&#160;((uint16_t)(((x) &lt;&lt; 8U) | (((x) &gt;&gt; 8U) &amp; 0x00FFU)))</td></tr>
<tr class="memdesc:gaaeb74e76832ed842048d448d556f26bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the byte ordering of a 16-bit value. <br /></td></tr>
<tr class="separator:gaaeb74e76832ed842048d448d556f26bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97584523775e03eb4b9443b2c6db1ca9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga97584523775e03eb4b9443b2c6db1ca9">CY_SWAP_ENDIAN32</a>(x)</td></tr>
<tr class="memdesc:ga97584523775e03eb4b9443b2c6db1ca9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the byte ordering of a 32-bit value.  <a href="group__group__utils.html#ga97584523775e03eb4b9443b2c6db1ca9">More...</a><br /></td></tr>
<tr class="separator:ga97584523775e03eb4b9443b2c6db1ca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdb9e784645440db1f74b0060eeec466"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gabdb9e784645440db1f74b0060eeec466">CY_SWAP_ENDIAN64</a>(x)</td></tr>
<tr class="memdesc:gabdb9e784645440db1f74b0060eeec466"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the byte ordering of a 64-bit value.  <a href="group__group__utils.html#gabdb9e784645440db1f74b0060eeec466">More...</a><br /></td></tr>
<tr class="separator:gabdb9e784645440db1f74b0060eeec466"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34975c78bf005e734701b46d04811c98"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga34975c78bf005e734701b46d04811c98">CY_GET_REG8</a>(addr)&#160;&#160;&#160;(*((const volatile uint8_t *)(addr)))</td></tr>
<tr class="memdesc:ga34975c78bf005e734701b46d04811c98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the 8-bit value from the specified address.  <a href="group__group__utils.html#ga34975c78bf005e734701b46d04811c98">More...</a><br /></td></tr>
<tr class="separator:ga34975c78bf005e734701b46d04811c98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeca2bcb3d8be3de33fe86b610bf86b90"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gaeca2bcb3d8be3de33fe86b610bf86b90">CY_SET_REG8</a>(addr,  value)&#160;&#160;&#160;(*((volatile uint8_t *)(addr)) = (uint8_t)(value))</td></tr>
<tr class="memdesc:gaeca2bcb3d8be3de33fe86b610bf86b90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes an 8-bit value to the specified address.  <a href="group__group__utils.html#gaeca2bcb3d8be3de33fe86b610bf86b90">More...</a><br /></td></tr>
<tr class="separator:gaeca2bcb3d8be3de33fe86b610bf86b90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21359444986c07db7fdb6993f313b472"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga21359444986c07db7fdb6993f313b472">CY_GET_REG16</a>(addr)&#160;&#160;&#160;(*((const volatile uint16_t *)(addr)))</td></tr>
<tr class="memdesc:ga21359444986c07db7fdb6993f313b472"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the 16-bit value from the specified address.  <a href="group__group__utils.html#ga21359444986c07db7fdb6993f313b472">More...</a><br /></td></tr>
<tr class="separator:ga21359444986c07db7fdb6993f313b472"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf6fdd73b6a193e60b1b8d11d6cbfcb13"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gaf6fdd73b6a193e60b1b8d11d6cbfcb13">CY_SET_REG16</a>(addr,  value)&#160;&#160;&#160;(*((volatile uint16_t *)(addr)) = (uint16_t)(value))</td></tr>
<tr class="memdesc:gaf6fdd73b6a193e60b1b8d11d6cbfcb13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the 16-bit value to the specified address.  <a href="group__group__utils.html#gaf6fdd73b6a193e60b1b8d11d6cbfcb13">More...</a><br /></td></tr>
<tr class="separator:gaf6fdd73b6a193e60b1b8d11d6cbfcb13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08558965aa9ed40b40be2e03382e866d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga08558965aa9ed40b40be2e03382e866d">CY_GET_REG24</a>(addr)</td></tr>
<tr class="memdesc:ga08558965aa9ed40b40be2e03382e866d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the 24-bit value from the specified address.  <a href="group__group__utils.html#ga08558965aa9ed40b40be2e03382e866d">More...</a><br /></td></tr>
<tr class="separator:ga08558965aa9ed40b40be2e03382e866d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga749ab39829e9caf8955d91dd355fe8b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga749ab39829e9caf8955d91dd355fe8b3">CY_SET_REG24</a>(addr,  value)</td></tr>
<tr class="memdesc:ga749ab39829e9caf8955d91dd355fe8b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the 24-bit value to the specified address.  <a href="group__group__utils.html#ga749ab39829e9caf8955d91dd355fe8b3">More...</a><br /></td></tr>
<tr class="separator:ga749ab39829e9caf8955d91dd355fe8b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99c7cedf249c18295512d896086dc64f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga99c7cedf249c18295512d896086dc64f">CY_GET_REG32</a>(addr)&#160;&#160;&#160;(*((const volatile uint32_t *)(addr)))</td></tr>
<tr class="memdesc:ga99c7cedf249c18295512d896086dc64f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the 32-bit value from the specified register.  <a href="group__group__utils.html#ga99c7cedf249c18295512d896086dc64f">More...</a><br /></td></tr>
<tr class="separator:ga99c7cedf249c18295512d896086dc64f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc826bc60da53abdb37e1e12c91d148a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#gafc826bc60da53abdb37e1e12c91d148a">CY_SET_REG32</a>(addr,  value)&#160;&#160;&#160;(*((volatile uint32_t *)(addr)) = (uint32_t)(value))</td></tr>
<tr class="memdesc:gafc826bc60da53abdb37e1e12c91d148a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the 32-bit value to the specified register.  <a href="group__group__utils.html#gafc826bc60da53abdb37e1e12c91d148a">More...</a><br /></td></tr>
<tr class="separator:gafc826bc60da53abdb37e1e12c91d148a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7dfff5dad289133d84f2c1caddd0382e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga7dfff5dad289133d84f2c1caddd0382e">_CLR_SET_FLD32U</a>(reg,  field,  value)&#160;&#160;&#160;    (((reg) &amp; ((uint32_t)(~(field ## _Msk)))) | (_VAL2FLD(field, value)))</td></tr>
<tr class="memdesc:ga7dfff5dad289133d84f2c1caddd0382e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The macro for setting a register with a name field and value for providing get-clear-modify-write operations.  <a href="group__group__utils.html#ga7dfff5dad289133d84f2c1caddd0382e">More...</a><br /></td></tr>
<tr class="separator:ga7dfff5dad289133d84f2c1caddd0382e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6873efbed50e1e0485e5f3279f193aa2"><td class="memItemLeft" align="right" valign="top"><a id="ga6873efbed50e1e0485e5f3279f193aa2" name="ga6873efbed50e1e0485e5f3279f193aa2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_REG32_CLR_SET</b>(reg,  field,  value)&#160;&#160;&#160;((reg) = <a class="el" href="group__group__utils.html#ga7dfff5dad289133d84f2c1caddd0382e">_CLR_SET_FLD32U</a>((reg), field, (value)))</td></tr>
<tr class="memdesc:ga6873efbed50e1e0485e5f3279f193aa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 32-bit register. <br /></td></tr>
<tr class="separator:ga6873efbed50e1e0485e5f3279f193aa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga10a2bdfbcf75aed8d292209057b0ee6b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga10a2bdfbcf75aed8d292209057b0ee6b">_CLR_SET_FLD16U</a>(reg,  field,  value)&#160;&#160;&#160;    ((uint16_t)(((reg) &amp; ((uint16_t)(~(field ## _Msk)))) | ((uint16_t)_VAL2FLD(field, value))))</td></tr>
<tr class="memdesc:ga10a2bdfbcf75aed8d292209057b0ee6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The macro for setting a 16-bit register with a name field and value for providing get-clear-modify-write operations.  <a href="group__group__utils.html#ga10a2bdfbcf75aed8d292209057b0ee6b">More...</a><br /></td></tr>
<tr class="separator:ga10a2bdfbcf75aed8d292209057b0ee6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2b4fa8f484a8308eadec61e80e82623"><td class="memItemLeft" align="right" valign="top"><a id="gab2b4fa8f484a8308eadec61e80e82623" name="gab2b4fa8f484a8308eadec61e80e82623"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_REG16_CLR_SET</b>(reg,  field,  value)&#160;&#160;&#160;((reg) = <a class="el" href="group__group__utils.html#ga10a2bdfbcf75aed8d292209057b0ee6b">_CLR_SET_FLD16U</a>((reg), field, (value)))</td></tr>
<tr class="memdesc:gab2b4fa8f484a8308eadec61e80e82623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 16-bit register. <br /></td></tr>
<tr class="separator:gab2b4fa8f484a8308eadec61e80e82623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e3bafb985f38613bde1147dc73fcf65"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga5e3bafb985f38613bde1147dc73fcf65">_CLR_SET_FLD8U</a>(reg,  field,  value)&#160;&#160;&#160;    ((uint8_t)(((reg) &amp; ((uint8_t)(~(field ## _Msk)))) | ((uint8_t)_VAL2FLD(field, value))))</td></tr>
<tr class="memdesc:ga5e3bafb985f38613bde1147dc73fcf65"><td class="mdescLeft">&#160;</td><td class="mdescRight">The macro for setting a 8-bit register with a name field and value for providing get-clear-modify-write operations.  <a href="group__group__utils.html#ga5e3bafb985f38613bde1147dc73fcf65">More...</a><br /></td></tr>
<tr class="separator:ga5e3bafb985f38613bde1147dc73fcf65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac927ea147352133e7a1ead8913247d90"><td class="memItemLeft" align="right" valign="top"><a id="gac927ea147352133e7a1ead8913247d90" name="gac927ea147352133e7a1ead8913247d90"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_REG8_CLR_SET</b>(reg,  field,  value)&#160;&#160;&#160;((reg) = <a class="el" href="group__group__utils.html#ga5e3bafb985f38613bde1147dc73fcf65">_CLR_SET_FLD8U</a>((reg), field, (value)))</td></tr>
<tr class="memdesc:gac927ea147352133e7a1ead8913247d90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 8-bit register. <br /></td></tr>
<tr class="separator:gac927ea147352133e7a1ead8913247d90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga935b8fbcfd877d03f234825f296e7ac9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga935b8fbcfd877d03f234825f296e7ac9">_BOOL2FLD</a>(field,  value)&#160;&#160;&#160;(((value) != false) ? (field ## _Msk) : 0UL)</td></tr>
<tr class="memdesc:ga935b8fbcfd877d03f234825f296e7ac9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a field mask if the value is not false.  <a href="group__group__utils.html#ga935b8fbcfd877d03f234825f296e7ac9">More...</a><br /></td></tr>
<tr class="separator:ga935b8fbcfd877d03f234825f296e7ac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d9ee76c64031ffe440b12e55bf6947d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__utils.html#ga8d9ee76c64031ffe440b12e55bf6947d">_FLD2BOOL</a>(field,  value)&#160;&#160;&#160;(((value) &amp; (field ## _Msk)) != 0UL)</td></tr>
<tr class="memdesc:ga8d9ee76c64031ffe440b12e55bf6947d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true, if the value includes the field mask.  <a href="group__group__utils.html#ga8d9ee76c64031ffe440b12e55bf6947d">More...</a><br /></td></tr>
<tr class="separator:ga8d9ee76c64031ffe440b12e55bf6947d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga05f244da002bc0c7dc9c1475053f8cfd"><td class="memItemLeft" align="right" valign="top"><a id="ga05f244da002bc0c7dc9c1475053f8cfd" name="ga05f244da002bc0c7dc9c1475053f8cfd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_SYSLIB_DIV_ROUND</b>(a,  b)&#160;&#160;&#160;(((a) + ((b) / 2U)) / (b))</td></tr>
<tr class="memdesc:ga05f244da002bc0c7dc9c1475053f8cfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates a / b with rounding to the nearest integer, a and b must have the same sign. <br /></td></tr>
<tr class="separator:ga05f244da002bc0c7dc9c1475053f8cfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7b4264645556dd22feb8b877a283e2a2"><td class="memItemLeft" align="right" valign="top"><a id="ga7b4264645556dd22feb8b877a283e2a2" name="ga7b4264645556dd22feb8b877a283e2a2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CY_SYSLIB_DIV_ROUNDUP</b>(a,  b)&#160;&#160;&#160;((((a) - 1U) / (b)) + 1U)</td></tr>
<tr class="memdesc:ga7b4264645556dd22feb8b877a283e2a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates a / b with rounding up if remainder != 0, both a and b must be positive. <br /></td></tr>
<tr class="separator:ga7b4264645556dd22feb8b877a283e2a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gae697a4ada82def1cf266ce7ad7c8fdbd"><td class="memItemLeft" align="right" valign="top"><a id="gae697a4ada82def1cf266ce7ad7c8fdbd" name="gae697a4ada82def1cf266ce7ad7c8fdbd"></a>
typedef char&#160;</td><td class="memItemRight" valign="bottom"><b>cy_char8_t</b></td></tr>
<tr class="memdesc:gae697a4ada82def1cf266ce7ad7c8fdbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specific-length typedef for the basic numerical types of char. <br /></td></tr>
<tr class="separator:gae697a4ada82def1cf266ce7ad7c8fdbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20c5888c9b8f65b00bcb57c74d774823"><td class="memItemLeft" align="right" valign="top"><a id="ga20c5888c9b8f65b00bcb57c74d774823" name="ga20c5888c9b8f65b00bcb57c74d774823"></a>
typedef float&#160;</td><td class="memItemRight" valign="bottom"><b>cy_float32_t</b></td></tr>
<tr class="memdesc:ga20c5888c9b8f65b00bcb57c74d774823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specific-length typedef for the basic numerical types of float. <br /></td></tr>
<tr class="separator:ga20c5888c9b8f65b00bcb57c74d774823"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94dedc99abc3e2712686cbf960a1bb5c"><td class="memItemLeft" align="right" valign="top"><a id="ga94dedc99abc3e2712686cbf960a1bb5c" name="ga94dedc99abc3e2712686cbf960a1bb5c"></a>
typedef double&#160;</td><td class="memItemRight" valign="bottom"><b>cy_float64_t</b></td></tr>
<tr class="memdesc:ga94dedc99abc3e2712686cbf960a1bb5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specific-length typedef for the basic numerical types of double. <br /></td></tr>
<tr class="separator:ga94dedc99abc3e2712686cbf960a1bb5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gad5bcf1928374c0433e7792c173bf7fd2" name="gad5bcf1928374c0433e7792c173bf7fd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad5bcf1928374c0433e7792c173bf7fd2">&#9670;&nbsp;</a></span>CY_HALT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_HALT</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">                        <span class="keywordflow">do</span> {                        \</div>
<div class="line">                        __asm(<span class="stringliteral">&quot;    bkpt    1&quot;</span>);  \</div>
<div class="line">                    } <span class="keywordflow">while</span>(<span class="keyword">false</span>)</div>
</div><!-- fragment -->
<p>Halt the processor in the debug state. </p>

</div>
</div>
<a id="gab8a1e3e0e2424cff7ad6ab53f6a183f5" name="gab8a1e3e0e2424cff7ad6ab53f6a183f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab8a1e3e0e2424cff7ad6ab53f6a183f5">&#9670;&nbsp;</a></span>CY_ASSERT_HANDLER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_ASSERT_HANDLER</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group__group__utils.html#gad5bcf1928374c0433e7792c173bf7fd2">CY_HALT</a>()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default assert handler. </p>
<p >To override, define CY_CUSTOM_ASSERT_HANDLER and define own CY_ASSERT_HANDLER API </p>

</div>
</div>
<a id="gab333fce69ffe5eef183d190d37cc04db" name="gab333fce69ffe5eef183d190d37cc04db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab333fce69ffe5eef183d190d37cc04db">&#9670;&nbsp;</a></span>CY_ASSERT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_ASSERT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">                                <span class="keywordflow">do</span> {                        \</div>
<div class="line">                                if(!(x))                \</div>
<div class="line">                                {                       \</div>
<div class="line">                                    CY_ASSERT_HANDLER();\</div>
<div class="line">                                }                       \</div>
<div class="line">                            } <span class="keywordflow">while</span> (<span class="keyword">false</span>)</div>
</div><!-- fragment -->
<p>Utility macro when neither NDEBUG or CY_NO_ASSERT is not declared to check a condition and, if false, trigger a breakpoint. </p>
<p >Assert an argument is true, else call assert handler </p>

</div>
</div>
<a id="gaa818442482e1820a57c6999be7d123a7" name="gaa818442482e1820a57c6999be7d123a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa818442482e1820a57c6999be7d123a7">&#9670;&nbsp;</a></span>CY_ASSERT_AND_RETURN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_ASSERT_AND_RETURN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">                            <span class="keywordflow">do</span> {                        \</div>
<div class="line">                                if(!(condition))        \</div>
<div class="line">                                {                       \</div>
<div class="line">                                    CY_ASSERT_HANDLER();\</div>
<div class="line">                                    return (value);     \</div>
<div class="line">                                }                       \</div>
<div class="line">                            } <span class="keywordflow">while</span> (<span class="keyword">false</span>)</div>
</div><!-- fragment -->
<p>Assert an argument is true, else call assert handler and return a value. </p>

</div>
</div>
<a id="ga684f094e4e6c95a4bf84c9fb2bf4decd" name="ga684f094e4e6c95a4bf84c9fb2bf4decd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga684f094e4e6c95a4bf84c9fb2bf4decd">&#9670;&nbsp;</a></span>CY_ASSERT_AND_RETURN_VOID</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_ASSERT_AND_RETURN_VOID</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">                            <span class="keywordflow">do</span> {                        \</div>
<div class="line">                                if(!(condition))        \</div>
<div class="line">                                {                       \</div>
<div class="line">                                    CY_ASSERT_HANDLER();\</div>
<div class="line">                                    return;             \</div>
<div class="line">                                }                       \</div>
<div class="line">                            } <span class="keywordflow">while</span> (<span class="keyword">false</span>)</div>
</div><!-- fragment -->
<p>Assert an argument is true, else call assert handler and return. </p>

</div>
</div>
<a id="ga97584523775e03eb4b9443b2c6db1ca9" name="ga97584523775e03eb4b9443b2c6db1ca9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga97584523775e03eb4b9443b2c6db1ca9">&#9670;&nbsp;</a></span>CY_SWAP_ENDIAN32</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_SWAP_ENDIAN32</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    ((uint32_t)((((x) &gt;&gt; 24U) &amp; 0x000000FFU) | (((x) &amp; 0x00FF0000U) &gt;&gt; 8U) | \</div>
<div class="line">                (((x) &amp; 0x0000FF00U) &lt;&lt; 8U) | ((x) &lt;&lt; 24U)))</div>
</div><!-- fragment -->
<p>Swap the byte ordering of a 32-bit value. </p>

</div>
</div>
<a id="gabdb9e784645440db1f74b0060eeec466" name="gabdb9e784645440db1f74b0060eeec466"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabdb9e784645440db1f74b0060eeec466">&#9670;&nbsp;</a></span>CY_SWAP_ENDIAN64</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_SWAP_ENDIAN64</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">                                ((uint64_t) (((uint64_t) <a class="code hl_define" href="group__group__utils.html#ga97584523775e03eb4b9443b2c6db1ca9">CY_SWAP_ENDIAN32</a>((uint32_t)(x)) &lt;&lt; 32U) | \</div>
<div class="line">                                CY_SWAP_ENDIAN32((uint32_t)((x) &gt;&gt; 32U))))</div>
<div class="ttc" id="agroup__group__utils_html_ga97584523775e03eb4b9443b2c6db1ca9"><div class="ttname"><a href="group__group__utils.html#ga97584523775e03eb4b9443b2c6db1ca9">CY_SWAP_ENDIAN32</a></div><div class="ttdeci">#define CY_SWAP_ENDIAN32(x)</div><div class="ttdoc">Swap the byte ordering of a 32-bit value.</div><div class="ttdef"><b>Definition:</b> cy_utils.h:137</div></div>
</div><!-- fragment -->
<p>Swap the byte ordering of a 64-bit value. </p>

</div>
</div>
<a id="ga34975c78bf005e734701b46d04811c98" name="ga34975c78bf005e734701b46d04811c98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga34975c78bf005e734701b46d04811c98">&#9670;&nbsp;</a></span>CY_GET_REG8</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_GET_REG8</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr</td><td>)</td>
          <td>&#160;&#160;&#160;(*((const volatile uint8_t *)(addr)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the 8-bit value from the specified address. </p>
<p >This function can't be used to access the Core register, otherwise a fault occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The read value. </dd></dl>

</div>
</div>
<a id="gaeca2bcb3d8be3de33fe86b610bf86b90" name="gaeca2bcb3d8be3de33fe86b610bf86b90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeca2bcb3d8be3de33fe86b610bf86b90">&#9670;&nbsp;</a></span>CY_SET_REG8</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_SET_REG8</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(*((volatile uint8_t *)(addr)) = (uint8_t)(value))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes an 8-bit value to the specified address. </p>
<p >This function can't be used to access the Core register, otherwise a fault occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
    <tr><td class="paramname">value</td><td>The value to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga21359444986c07db7fdb6993f313b472" name="ga21359444986c07db7fdb6993f313b472"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga21359444986c07db7fdb6993f313b472">&#9670;&nbsp;</a></span>CY_GET_REG16</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_GET_REG16</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr</td><td>)</td>
          <td>&#160;&#160;&#160;(*((const volatile uint16_t *)(addr)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the 16-bit value from the specified address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The read value. </dd></dl>

</div>
</div>
<a id="gaf6fdd73b6a193e60b1b8d11d6cbfcb13" name="gaf6fdd73b6a193e60b1b8d11d6cbfcb13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf6fdd73b6a193e60b1b8d11d6cbfcb13">&#9670;&nbsp;</a></span>CY_SET_REG16</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_SET_REG16</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(*((volatile uint16_t *)(addr)) = (uint16_t)(value))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes the 16-bit value to the specified address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
    <tr><td class="paramname">value</td><td>The value to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga08558965aa9ed40b40be2e03382e866d" name="ga08558965aa9ed40b40be2e03382e866d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga08558965aa9ed40b40be2e03382e866d">&#9670;&nbsp;</a></span>CY_GET_REG24</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_GET_REG24</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">                            (((uint32_t) (*((<span class="keyword">const</span> <span class="keyword">volatile</span> uint8_t *)(addr)))) | \</div>
<div class="line">                            (((uint32_t) (*((<span class="keyword">const</span> <span class="keyword">volatile</span> uint8_t *)(addr) + 1))) &lt;&lt; 8U) | \</div>
<div class="line">                            (((uint32_t) (*((<span class="keyword">const</span> <span class="keyword">volatile</span> uint8_t *)(addr) + 2))) &lt;&lt; 16U))</div>
</div><!-- fragment -->
<p>Reads the 24-bit value from the specified address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The read value. </dd></dl>

</div>
</div>
<a id="ga749ab39829e9caf8955d91dd355fe8b3" name="ga749ab39829e9caf8955d91dd355fe8b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga749ab39829e9caf8955d91dd355fe8b3">&#9670;&nbsp;</a></span>CY_SET_REG24</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_SET_REG24</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">    <span class="keywordflow">do</span>  \</div>
<div class="line">    {   \</div>
<div class="line">        (*((<span class="keyword">volatile</span> uint8_t *) (addr))) = (uint8_t)(value);                \</div>
<div class="line">        (*((<span class="keyword">volatile</span> uint8_t *) (addr) + 1)) = (uint8_t)((value) &gt;&gt; 8U);    \</div>
<div class="line">        (*((<span class="keyword">volatile</span> uint8_t *) (addr) + 2)) = (uint8_t)((value) &gt;&gt; 16U);   \</div>
<div class="line">    }   \</div>
<div class="line">    while(0)</div>
</div><!-- fragment -->
<p>Writes the 24-bit value to the specified address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
    <tr><td class="paramname">value</td><td>The value to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga99c7cedf249c18295512d896086dc64f" name="ga99c7cedf249c18295512d896086dc64f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga99c7cedf249c18295512d896086dc64f">&#9670;&nbsp;</a></span>CY_GET_REG32</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_GET_REG32</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr</td><td>)</td>
          <td>&#160;&#160;&#160;(*((const volatile uint32_t *)(addr)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the 32-bit value from the specified register. </p>
<p >The address is the little endian order (LSB in lowest address).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The read value. </dd></dl>

</div>
</div>
<a id="gafc826bc60da53abdb37e1e12c91d148a" name="gafc826bc60da53abdb37e1e12c91d148a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc826bc60da53abdb37e1e12c91d148a">&#9670;&nbsp;</a></span>CY_SET_REG32</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CY_SET_REG32</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">addr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(*((volatile uint32_t *)(addr)) = (uint32_t)(value))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes the 32-bit value to the specified register. </p>
<p >The address is the little endian order (LSB in lowest address).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The register address.</td></tr>
    <tr><td class="paramname">value</td><td>The value to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7dfff5dad289133d84f2c1caddd0382e" name="ga7dfff5dad289133d84f2c1caddd0382e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7dfff5dad289133d84f2c1caddd0382e">&#9670;&nbsp;</a></span>_CLR_SET_FLD32U</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _CLR_SET_FLD32U</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">reg, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;    (((reg) &amp; ((uint32_t)(~(field ## _Msk)))) | (_VAL2FLD(field, value)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The macro for setting a register with a name field and value for providing get-clear-modify-write operations. </p>
<p >Returns a resulting value to be assigned to the register. </p>

</div>
</div>
<a id="ga10a2bdfbcf75aed8d292209057b0ee6b" name="ga10a2bdfbcf75aed8d292209057b0ee6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga10a2bdfbcf75aed8d292209057b0ee6b">&#9670;&nbsp;</a></span>_CLR_SET_FLD16U</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _CLR_SET_FLD16U</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">reg, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;    ((uint16_t)(((reg) &amp; ((uint16_t)(~(field ## _Msk)))) | ((uint16_t)_VAL2FLD(field, value))))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The macro for setting a 16-bit register with a name field and value for providing get-clear-modify-write operations. </p>
<p >Returns a resulting value to be assigned to the 16-bit register. </p>

</div>
</div>
<a id="ga5e3bafb985f38613bde1147dc73fcf65" name="ga5e3bafb985f38613bde1147dc73fcf65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5e3bafb985f38613bde1147dc73fcf65">&#9670;&nbsp;</a></span>_CLR_SET_FLD8U</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _CLR_SET_FLD8U</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">reg, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;    ((uint8_t)(((reg) &amp; ((uint8_t)(~(field ## _Msk)))) | ((uint8_t)_VAL2FLD(field, value))))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The macro for setting a 8-bit register with a name field and value for providing get-clear-modify-write operations. </p>
<p >Returns a resulting value to be assigned to the 8-bit register. </p>

</div>
</div>
<a id="ga935b8fbcfd877d03f234825f296e7ac9" name="ga935b8fbcfd877d03f234825f296e7ac9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga935b8fbcfd877d03f234825f296e7ac9">&#9670;&nbsp;</a></span>_BOOL2FLD</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _BOOL2FLD</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(((value) != false) ? (field ## _Msk) : 0UL)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a field mask if the value is not false. </p>
<p >Returns 0, if the value is false. </p>

</div>
</div>
<a id="ga8d9ee76c64031ffe440b12e55bf6947d" name="ga8d9ee76c64031ffe440b12e55bf6947d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d9ee76c64031ffe440b12e55bf6947d">&#9670;&nbsp;</a></span>_FLD2BOOL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _FLD2BOOL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">field, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">value&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(((value) &amp; (field ## _Msk)) != 0UL)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true, if the value includes the field mask. </p>
<p >Returns false, if the value doesn't include the field mask. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>(core-lib)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
